Skip to content

Instantly share code, notes, and snippets.

@oscarkraemer
oscarkraemer / gist:c8747fbc85e7f908dcc00b4357fb04b2
Created November 19, 2017 20:15
Linux UEFI boot on Lenovo m91p
# http://www.rodsbooks.com/linux-uefi/
# 1. Install Linux normally
# 2. Boot from Linux live usb drive
# 3. Most likely /dev/sda1 but it can be something else:
mount /dev/sda1 /mnt
mkdir -p /mnt/EFI/Microsoft/Boot
# 5. Depending on if it is ubuntu, centos or any other distro:
cp /mnt/EFI/centos/grubx64.efi /mnt/EFI/Microsoft/Boot/bootmgfw.efi
# I don't remember but I think it was like this.
7 efibootmgr --create --label "Windows Boot Manager" --loader "\EFI\Microsoft\Boot\bootmgfw.efi"
@nizioleque
nizioleque / Code.gs
Last active May 20, 2024 22:56
Google Calendar events bulk edit (with Google Apps Script)
function start() { main(); }
// CONFIGURE BELOW ------------------------------------------------
const Test = true;
const TestFn = events => {
const testEvent = events[0];
console.log(testEvent);
const response = updateEvent(testEvent);
@ericaroy
ericaroy / Android Home
Last active May 20, 2024 22:56
Setting Android Home on Mac
Note for me to remember how to set Android Home on Mac
Open Terminal and type in..
nano ~/.bash_profile
Add the below paths
The path should be where your android installation is located
export ANDROID_HOME=/Users/username/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Save file and type in terminal...
source ~/.bash_profile
@ameenkhan07
ameenkhan07 / FB-PE-InterviewTips.md
Last active May 20, 2024 22:55
Facebook Production Engineering Interview

What to Expect and Tips

• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.

Systems

More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).

Design/Architecture 

Interview is all about taking an ambiguous question of how you might build a system and letting

@fortuna
fortuna / merge_results.tsv
Last active May 20, 2024 22:53
Analysis of blocking in Russia. All entries in one table.
strategy server_net server_port isp url_scheme exit_code img error
$key Digital Ocean 443 Bee Line Cable http 0
$key Digital Ocean 443 Bee Line Cable https 0
$key Digital Ocean 443 MTS PJSC http 28 curl: (28) Operation timed out after 10006 milliseconds with 0 bytes received
$key Digital Ocean 443 MTS PJSC https 28 curl: (28) Connection timed out after 10005 milliseconds
$key Digital Ocean 443 PJSC MegaFon http 0
$key Digital Ocean 443 PJSC MegaFon https 56 curl: (56) Failure when receiving data from the peer
$key Digital Ocean 443 Tele2 Russia http 0
$key Digital Ocean 443 Tele2 Russia https 0
$key Digital Ocean 5555 Bee Line Cable http 0
@BigAlRender
BigAlRender / render-build.sh
Last active May 20, 2024 22:53
Install Chrome on Render Native Environment
#!/usr/bin/env bash
# exit on error
set -o errexit
STORAGE_DIR=/opt/render/project/.render
if [[ ! -d $STORAGE_DIR/chrome ]]; then
echo "...Downloading Chrome"
mkdir -p $STORAGE_DIR/chrome
cd $STORAGE_DIR/chrome
@agronick
agronick / pids.csv
Created September 9, 2023 23:37
Mazda 3 PIDs (Rough List)
Name ShortName ModeAndPID Equation Min Value Max Value Units Header startDiagnostic stopDiagnostic scale minimumRefreshDelayMillis
[FORD]Coolant temperature(From TCM) Coolant 0x0105 A-40 0 120 °C TCM 1 0
[FORD]Engine Oil Temp EOT 0x221310 (((A*256)+B)/100)-40 0 300 °C Auto 1 0
Boost Pressure BOOST 0x22f470 ((D*256+E)/32-[33])/100 -0.5 1.8 bar 7E0 1 0
Boost Pressure Desired BOOST DSD 0x22f470 ((B*256+C)/32-[33])/100 -0.5 1.8 bar 7E0 1 0
Brake Fluid Pressure BFP 0x22280a (A*256+B)*100/128 0 65535 kPa 7E0 1 0
Brake Switch BRAKE SW 0x22da05 {A:7} 0 1 ON/OFF 726 1 0
Charge Air Cooler Temperature CACT 0x22f477 C-40 -40 100 °C 7E0 1 0
Coupling Solenoid Duty Cycle CUP SOL 0x221e7a A*100/255 0 100 % 761 1 0
Distance from Bumper to Target DIST BMP TGT 0x22d901 B/4 0 16 m 793 1 0
@YoEight
YoEight / improve_fonts.md
Created January 15, 2021 10:11 — forked from j1cs/improve_fonts.md
Improve fonts archlinux

Improve Fonts

Newest

Make your Arch fonts beautiful easily! This is what I do when I install Arch Linux to improve the fonts.

You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):

Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts

@yukiarimo
yukiarimo / webnovel-downloader.js
Created March 14, 2024 20:52
Web novel Downloader
function extractAndDownloadAllChapters() {
// Find all containers that hold chapter text
const chapterContainers = document.querySelectorAll('.cha-words');
// Initialize an array to hold all chapter texts
let allChaptersText = [];
// Iterate over each chapter container
chapterContainers.forEach(container => {
// Get all paragraph elements within the container